<?php
/**
 * User: yuesir
 * Date: 2016/4/27
 * Time: 21:33
 */
namespace Lib;

class Register {

    protected static $objects;

    static function set($alias, $object)
    {
        self::$objects[$alias] = $object;
    }

    static function get($name)
    {
        if(isset(self::$objects[$name])) {
            return self::$objects[$name];
        }

        return null;
    }

    static function _unset($alias)
    {
        unset(self::$objects[$alias]);
    }
}